import json
import unittest
with open("data.json","r",encoding="utf-8") as f:
    num = json.load(f)
    print(num.get('name'))
    print(num.get('school'))
class TestJson(unittest.TestCase):
    def test01(self):
        self.assertEqual('小明',num.get('name'))
        self.assertIn('清华',num.get('school'))
if __name__ == '__main__':
    unittest.main()


